#ifndef GUI_MAINWINDOW_H
#define GUI_MAINWINDOW_H


#include <QMainWindow>
#include <QtGui>
#include "map_data_control.h"

class QMainWindow;
QT_BEGIN_NAMESPACE
class QAction;
class QMenu;
class QMdiArea;
class QMdiSubWindow;
class QSignalMapper;
QT_END_NAMESPACE

class GUIMainWindow: public QMainWindow
{
    Q_OBJECT
public:

    GUIMainWindow();

protected:
    void closeEvent(QCloseEvent *event);

private slots:
    void configureFuzzy();
    void openMapOfProperty();
    void openMapOfPropertyKrigin();
    void openMapOfPropertyKrigin2();
    void openMapOfPropertyKriginCuda();
    void openMapOfQuality();
    void openMapOfPotencial();
    void saveAs();
    void copy();
    void paste();
    void about();
    void updateMenus();
    void updateWindowMenu();
    void setActiveSubWindow(QWidget *window);

private:
    void createActions();
    void createMenus();
    void createToolBars();
    void createStatusBar();
    void readSettings();
    void writeSettings();
    void executeKriging(QString str);
    QMainWindow *activeMdiChild();
    QMdiSubWindow *findMdiChild(const QString &fileName);

    QMdiArea *mdiArea;
    QSignalMapper *windowMapper;

    QMenu *fileMenu;
    QMenu *editMenu;
    QMenu *windowMenu;
    QMenu *helpMenu;
    QToolBar *fileToolBar;
    QToolBar *editToolBar;
    QAction *configFuzzyAct;
    QAction *configKrigAct;
    QAction *configKrigcAct;
    QAction *configKrigCudaAct;
    QAction *openMPropertyAct;
    QAction *openMQualityAct;
    QAction *openMPotencialAct;
    QAction *saveAsAct;
    QAction *exitAct;
    QAction *copyAct;
    QAction *pasteAct;
    QAction *closeAct;
    QAction *closeAllAct;
    QAction *tileAct;
    QAction *cascadeAct;
    QAction *nextAct;
    QAction *previousAct;
    QAction *separatorAct;
    QAction *aboutAct;
    QAction *aboutQtAct;
    QString fileName;
    QHBoxLayout windowLayout;

    MapDataControl* mapDataControl;
  };

#endif // GUI_MAINWINDOW_H
